package com.clay.appointment.repository;

import com.clay.appointment.entity.hospital.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author : clay
 * @Description:
 * @Date: Create in 21:23 2021/7/30
 * @Modified By:
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital,String> {
    /**
     * 判断是否存在这个数据
     * @param hospitalCode 医院编号
     * @return 医院对象
     */
    Hospital getHospitalByHospitalCode(String hospitalCode);

    /**
     * 根据医院名模糊查询医院
     * @param hospitalName 医院名
     * @return 医院对象集合
     */
    List<Hospital> findHospitalByHospitalNameLike(String hospitalName);
}
